import { mapMutations } from 'vuex'
export default {
  computed: {
  },
  methods: {
    ...mapMutations(['hideLogin']),
    getLogin() {
      const _this = this
      uni.login({
        provider: 'weixin',
        success: function(loginRes) {
          // 获取用户信息
          uni.getUserInfo({
            provider: 'weixin',
            success(infoRes) {
              console.log('用户openId: ', infoRes)
              const userInfo = infoRes.userInfo
              userInfo.openId = 'eqdasdasda'
              userInfo.mobile = '18888888888'
            },
            complete() {
              _this.hideLogin()
            }
          })
        }
      })
    },
  }
}
